import { memberlist } from '../../../request/api'
const state = {
    memberlist: []
}

const getters = {
    getList(state) {
        return state.memberlist
    }
}

const mutations = {
    REQ_LIST(state,payLoad){
        state.memberlist = payLoad
    }
}

const actions = {
    getMemberList({commit}) {
        memberlist()
            .then(res => {
                if (res.code == 200) {
                   commit('REQ_LIST',res.list)
                }
            })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}